//
//  WJSearchBar.m
//  weibo
//
//  Created by 王俊 on 15/12/27.
//  Copyright © 2015年 王俊. All rights reserved.
//

#import "WJSearchBar.h"

@implementation WJSearchBar

+ (instancetype)searchBar
{
    
    WJSearchBar *inputTextField = [[WJSearchBar alloc]init];
    inputTextField.height = 30;
    inputTextField.width = SCNWDTH - 40;
    inputTextField.layer.borderWidth = 1;
    inputTextField.layer.borderColor = [UIColor lightGrayColor].CGColor;
    inputTextField.layer.cornerRadius = 5;
    inputTextField.backgroundColor = [UIColor whiteColor];
    inputTextField.placeholder = @"请输入搜索条件";
    inputTextField.font = [UIFont systemFontOfSize:13];
    UIImageView *leftView = [[UIImageView alloc]init];
    leftView.image = [UIImage imageNamed:@"searchbar_textfield_search_icon"];
    leftView.height = 30;
    leftView.width = 30;
    leftView.contentMode = UIViewContentModeCenter;
    inputTextField.leftView = leftView;
    inputTextField.leftViewMode = UITextFieldViewModeAlways;
    return inputTextField;
}
@end
